$(".add_back").click(function(){
			closeWin();			
		})
		 var url = document.location.href.toString();
		 var u = url.split("=");
		 
		 //alert(u[1]) 获取通过URL向下一个页面传过来的id值
		 //订单详情第一个接口
//_________________________________________________________onOff的点击________________
	
		$(".onOff").click(function(){
			if($(".onOff").text()=="关闭"){
				layer.msg('关闭中...', {icon: 16,shade: 0.01,time:100});
				$.ajax({
					type:"post",
					url:"../order/"+u[1]+"/bs/off?temp="+Math.random(),
					dataType:"json",
					success:function(data){
						if(data.status=="1001"){
							$(".onOff").css({"background":"#acacac"});
							$(".onOff").text("开启");
					 		$(".addChangeSeats").hide();	//升舱
					 		$(".addConnecting").hide();	    //增加联程
					 		$(".addChangeTickets").hide();	//调票
					 		$(".addTaxes").hide();          //税金
					 		layer.msg('关闭成功...', {icon: 1,time:500});
						}else{
							layer.alert("关闭失败"+data.message,{title:['关闭失败','background-color:#6d6e72; color:#fff;font-size:14px;']});
						}
					}
					
				})
					
			}else{
				layer.msg('开启中...', {icon: 16,shade: 0.01});				
				$.ajax({
					type:"post",
					url:"../order/"+u[1]+"/bs/on?temp="+Math.random(),
					dataType:"json",
					success:function(data){
						if(data.status=="1001"){
							$(".onOff").css({"background":"#faa001"});
							$(".onOff").text("关闭");
							allAjax()
							layer.msg('开启成功...', {icon: 1,time:500});
						}else{
							layer.alert("开启失败"+data.message,{title:['开启失败','background-color:#6d6e72; color:#fff;font-size:14px;']});
						}
					}
					
				})
				
			}
		})
//——————————————————————————————————页面渲染——————————————————————————————————
	allAjax()
	function allAjax(){
		  var exportsData = {};
		  $.ajax({
				type:"get",
				url:"../order/"+u[1]+"?temp="+Math.random(),
				//url:"../JSON/orderDetail.json",
				dataType:"json",
				async:false,
				success:function(data){	
					data.data.quoteCurrency?exportsData.quoteCurrency = data.data.quoteCurrency:exportsData.quoteCurrency = "";
					data.data.settlePrice?exportsData.settlePrice = data.data.settlePrice:exportsData.settlePrice = "";
					data.data.settleCurrency?exportsData.settleCurrency = data.data.settleCurrency:exportsData.settleCurrency = "";
					$("#order_id").text(data.data.id);
					$("#platformOrderId").text(data.data.platformOrderId);
					$("#createUserName").text(data.data.createUserName);
					$("#status").text(commomFun.orderStatusStr(data.data.status));
					$("#price").text(data.data.totalPrice);	
					$(".contractId").text(data.data.contractId);
					$(".purchaseName").text(data.data.purchaseName);
					$(".passengerTotal").text(data.data.passengerTotal);
					$(".currency1").text(commomFun.currencyMStr(data.data.quoteCurrency));//报价货币类型
					$(".baojiaCurrency").text(data.data.quoteCurrency);//报价货币类型
					$(".orderMessageTable .ticketRate_").text(data.data.ticketRate);
					$(".orderMessageTable .ticketLossRate_").text(data.data.ticketLossRate);
					$(".orderMessageTable .ticketLoss_").text(data.data.ticketLoss);
					$(".orderMessageTable .freeFareName_").text(data.data.freeFareName);
					var quoteCurrencyStr = "";
					if(exportsData.quoteCurrency){                             //报价货币类型
						quoteCurrencyStr += '('+exportsData.quoteCurrency+')';
						$(".currency2").text(quoteCurrencyStr);
					}
					//人数的显示										
					var adultCount = data.data.adultCount?data.data.adultCount:0;
					var childCount = data.data.childCount?data.data.childCount:0;
					var infantCount = data.data.infantCount?data.data.infantCount:0;
					$(".ZFaudlt").text(adultCount);
					$(".ZFchild").text(childCount);
					$(".ZFinfant").text(infantCount);
					var status = data.data.status;
					var type = data.data.type;										
					//按钮的显示与隐藏
					if(data.data.bs=="on"){
						buttonOnOff(status,type)
					}else{
						buttonOnOff(status,type)						
						$(".addChangeSeats").hide();	//升舱
		 				$(".addConnecting").hide();	    //增加联程
		 				$(".addChangeTickets").hide();	//调票	
		 				$(".addTaxes").hide();          //税金
		 				$(".onOff").css({"background":"#acacac"});
						$(".onOff").text("开启");
					}
				 	
				}
			})
		 //第二个接口
		  $.ajax({
				type:"get",
				url:"../order/"+u[1]+"/itinery?temp="+Math.random(),
				dataType:"json",
				async:true,
				success:function(data){					
					$(".clear").empty();
					var str="";	
					zhuiWeiCabin = commomFun.cabinStatusStr(data.data.list[0].seatClass)//设置全局变量，给追尾table
					for(var i=0;i<data.data.list.length;i++){
						str+='<tr>'+
						'<td>'+data.data.list[i].index+'</td>'+
						'<td>'+data.data.list[i].departureAirport+"("+data.data.list[i].departureAirportCode+")"+data.data.list[i].departureAirportTerminal+"-"+data.data.list[i].arriveAirport+"("+data.data.list[i].arriveAirportCode+")"+data.data.list[i].arriveAirportTerminal+'</td>'+
						'<td>'+data.data.list[i].flightNumber+'</td>'+
						'<td>'+commomFun.cabinStatusStr(data.data.list[i].seatClass)+'</td>'+
						//'<td>'+data.data.list[i].invLegCabinId+'</td>'+
						'<td>'+data.data.list[i].departureDate+'</td>'+
						'<td>'+data.data.list[i].departureTime+'</td>'+
						'<td>'+data.data.list[i].arriveAirportDate+'</td>'+
						'<td>'+data.data.list[i].arriveAirportTime+'</td>'+
						'</tr>';
							
						}
					$(".clear").append(str);
						
					}
				})
				
				//第三个接口 旅客与出票信息
		 	
		  $.ajax({
				type:"get",
				url:"../order/"+u[1]+"/passenger?pageNum=1&pageSize=10000&temp="+Math.random(),
				//url:"../JSON/orderDetail3.json",
				dataType:"json",
				async:true,
				success:function(data){		
					$(".clearPassenger").empty();
					var str="";
					var adult=0;//初始化成人的人数
					var child=0;//初始化儿童的人数
					var infant=0;//初始化婴儿的人数
					var No=0;
					for(var i=0;i<data.data.list.length;i++){
						No++
						if(data.data.list[i].type==1){
							adult++;
						}
						if(data.data.list[i].type==2){
							child++;
						}
						if(data.data.list[i].type==3){
							infant++;
						}
						//是否增加升舱的标识
						if(data.data.list[i].seatUp=="1"){
							str+='<tr>'+
							'<td>'+No+'</td>'+
							'<td style=display:none; class=passengerId>'+data.data.list[i].id+'</td>'+
							"<td id=shengSeatImg class=chineseName>"+commomFun.toEmptyString(data.data.list[i].chineseSurname)+commomFun.toEmptyString(data.data.list[i].chineseName)+"<br/>"+commomFun.toEmptyString(data.data.list[i].englishSurname)+"/"+commomFun.toEmptyString(data.data.list[i].englishName)+"</td>"
							
						}else{
							str+='<tr>'+
							'<td>'+No+'</td>'+
							'<td style=display:none; class=passengerId>'+data.data.list[i].id+'</td>'+
							'<td class=chineseName>'+commomFun.toEmptyString(data.data.list[i].chineseSurname)+commomFun.toEmptyString(data.data.list[i].chineseName)+'<br/>'+commomFun.toEmptyString(data.data.list[i].englishSurname)+"/"+commomFun.toEmptyString(data.data.list[i].englishName)+
							'</td>'
						}
						
						
				   var mobile = data.data.list[i].mobile?data.data.list[i].mobile:"";
				   var roundType = "";
				   if(data.data.list[i].roundType){
					   if(data.data.list[i].roundType=="1"){
						   roundType = "去程";
					   }else if(data.data.list[i].roundType=="2"){
						   roundType = "回程";
					   }
				   }
				   str+='<td>'+commomFun.genderStr(data.data.list[i].gender)+'</td>'+
						'<td>'+commomFun.typeNumStr(data.data.list[i].type)+'</td>'+
						'<td>'+commomFun.certificateTypeStr(data.data.list[i].certificateType)+'</td>'+
						'<td class=certificateNumber>'+data.data.list[i].certificateNumber+'</td>'+
						'<td>'+commomFun.toEmptyString(data.data.list[i].certificateExpireDate)+'</td>'+
						'<td>'+commomFun.toEmptyString(data.data.list[i].birthDate)+'</td>'+
						'<td>'+mobile+'</td>'+
						'<td>'+roundType+'</td>'+
						'<td>'+commomFun.toEmptyString(data.data.list[i].email)+'</td>'+
						'<td class=signTicketNumber>'+commomFun.toEmptyString(data.data.list[i].ticketNumber)+'</td>'+
						'<td>'+commomFun.toEmptyString(data.data.list[i].adult)+'</td>'+
						'<td><span class="detail_grogshop">详情</span>'+
						'<div class="grogshopDetail">'+commomFun.hotelDetail(data.data.list[i].grogshop)+'</div>'+
						'</td>'+
						'</tr>';	
						
						
						}
					$("#audlt").text(adult);
					$("#child").text(child);
					$("#infant").text(infant);
					$(".clearPassenger").append(str);						
					}
				})
		
				
				//第四个接口 票价与支付
		 	$.ajax({
				type:"get",
				url:"../order/"+u[1]+"/pjyzf?temp="+Math.random(),
				dataType:"json",
				async:true,
				success:function(data){
					$(".pjzf").empty();
					var str="";					
					for(var i=0;i<data.data.length;i++){						
						var settleCurrencyStr = "";							
						if(exportsData.settleCurrency){
							settleCurrencyStr += '('+exportsData.settleCurrency+')';
							$(".currency3").text(settleCurrencyStr);
						}
						var viewPrice = "";
						if(data.data[i].passengerType=="1"){
							viewPrice += data.data[i].viewAdultPrice?data.data[i].viewAdultPrice:"";
						}else if(data.data[i].passengerType=="2"){
							viewPrice += data.data[i].viewChildPrice?data.data[i].viewChildPrice:"";
						}else if(data.data[i].passengerType=="3"){
							viewPrice += data.data[i].viewInfantPrice?data.data[i].viewInfantPrice:"";
						}else{
							viewPrice += "数据有误";
						}
							str+='<tr>'+
									'<td>'+commomFun.typeNumStr(data.data[i].passengerType)+'</td>'+
									'<td>'+data.data[i].price+'</td>'+
									'<td>'+data.data[i].tax+'</td>'+
									'<td>'+data.data[i].totalPrice+"/"+viewPrice+'</td>'+
									'<td>'+data.data[i].passengerTotal+'</td>'+
									'<td>'+data.data[i].tp+'</td>'
						if(i==0){
							str+='<td rowspan='+data.data.length+'>'+exportsData.settlePrice+'</td>'
						}
							str+='</tr>';							
					}	
						$(".pjzf").append(str);										
					}
				}) 

			
//————————————————————————————————————————————————————————————————————————————————第6个接口，调票信息展示
		var changeTicketsTotalPrice=0;
	 	$.ajax({
			type:"get",
			url:"../orderAddon/getSeatModifyList?orderId="+u[1]+"&temp="+Math.random(),
			dataType:"json",
			async:false,
			success:function(data){
				$(".changeTicketsClear").empty();
				var str = "";
				var channelArr = [];
				for(var i=0;i<data.data.length;i++){
					var totalPrice = data.data[i].seat*data.data[i].priceUnit;
					changeTicketsTotalPrice+=totalPrice;
					var remarks = data.data[i].remarks?data.data[i].remarks:"";
					channelArr.push(commomFun.refundChannel(data.data[i].channel));
					str+="<tr>"+
							"<td>调票</td>"+
							"<td>"+data.data[i].seat+"</td>"+
							"<td>"+(data.data[i].priceUnit).toFixed(2)+"</td>"+
							"<td>"+totalPrice.toFixed(2)+"</td>"+
							"<td class='channel1'>"+commomFun.refundChannel(data.data[i].channel)+"</td>"+
							"<td>"+remarks+"</td>"+		
					     "</tr>"				
				}				
				$(".changeTicketsClear").append(str);
				var every = channelArr.every(function(x){return x==""});
				if(every){
					$(".pass1,.channel1").hide();
				}else{
					$(".pass1,.channel1").show();
				}
			}
		}) 
		
	 	
//______________________________________________________________________________第7个接口    税金信息展示
		var taxesTotalPrice = 0;
		$.ajax({
			type:"get",
			url:"../orderAddon/getTaxAddonList?orderId="+u[1]+"&temp="+Math.random(),
			dataType:"json",
			async:false,
			success:function(data){
					$(".taxesTableClear").empty();
					var str = "";	
					var channelArr = [];
					for(var i=0;i<data.data.length;i++){
						var totalPrice = (data.data[i].seat*data.data[i].priceUnit);
						taxesTotalPrice+=totalPrice;
						var remarks = data.data[i].remarks?data.data[i].remarks:"";
						var status = data.data[i].status?data.data[i].status:"";
						var settlePrice = data.data[i].settlePrice?(data.data[i].settlePrice).toFixed(2):"";						
						channelArr.push(commomFun.refundChannel(data.data[i].channel));
						if(status=="1"){
							status = "未支付"
						}
						if(status=="2"){
							status = "已支付"
						}
						var settleCurrencyStr = "";
						if(data.data[i].settleCurrency){
							settleCurrencyStr += '('+data.data[i].settleCurrency+')'
						}
						str+="<tr>"+
								"<td>税金</td>"+
								"<td>"+data.data[i].seat+"</td>"+
								"<td>"+(data.data[i].priceUnit).toFixed(2)+"</td>"+
								"<td>"+totalPrice.toFixed(2)+"</td>"+
								"<td>"+settlePrice+settleCurrencyStr+"</td>"+
								"<td class='channel2'>"+commomFun.refundChannel(data.data[i].channel)+"</td>"+
								"<td>"+remarks+"</td>"+	
								"<td>"+status+"</td>"+	
						     "</tr>"				
					}
					
					$(".taxesTableClear").append(str);
					var every = channelArr.every(function(x){return x==""});
					if(every){
						$(".pass2,.channel2").hide();
					}else{
						$(".pass2,.channel2").show();
					}
			}
		})
		var additionTtem = (changeTicketsTotalPrice+taxesTotalPrice).toFixed(2);			
		$(".money").text(additionTtem);
//_______________________________________________________________________________调整票款 数据展示
		$.ajax({
			type:"get",
			url:"../orderModifyPrice/"+u[1]+"?temp="+Math.random(),
			dataType:"json",
			async:true,
			success:function(data){
				$(".editTZPKTableClear").empty();
				if(data.status==1001){
					var str = "";
					var channelArr = [];
					for(var i=0;i<data.data.length;i++){
						var settleCurrencyStr = "";
						channelArr.push(commomFun.refundChannel(data.data[i].channel));
						if(data.data[i].settleCurrency){
							settleCurrencyStr += '('+data.data[i].settleCurrency+')'
						}
						str+="<tr>" +
								"<td>调整票款</td>"+
								"<td>"+(data.data[i].amount).toFixed(2)+"</td>"+
								"<td>"+commomFun.toEmptyString(data.data[i].settlePrice)+settleCurrencyStr+"</td>"+
								"<td class='channel3'>"+commomFun.refundChannel(data.data[i].channel)+"</td>"+
								"<td>"+data.data[i].remark+"</td>"+
							 "</tr>"
					}					
					$(".editTZPKTableClear").append(str);
					var every = channelArr.every(function(x){return x==""});
					if(every){
						$(".pass3,.channel3").hide();
					}else{
						$(".pass3,.channel3").show();
					}
				}
			}				
		})
//_________________________________________________________________________________第8个接口  联程信息展示
		$.ajax({
				type:"get",
				url:"../order/"+u[1]+"/findConnectOrder?temp="+Math.random(),
				dataType:"json",
				async:true,
				success:function(data){
					$(".connectList").empty();
					var str="";
					if(data.data.length==0){
						return false;
					}else{
						var indexNo=-1;
						for(var i=0;i<data.data.length;i++){
							indexNo++;
							var str2="";
							var adultBtnStr="";//审核按钮字符串
							var delconStr="";//删除联运按钮
							if($(".condel").val()=="1"){
								delconStr="<span class='iconfont deleteCon' title='删除' connectId="+data.data[i].id+">&#xe606;</span>";
							}
							
							var No=0;				
							for(var j=0;j<data.data[i].itineraries.length;j++){	
								var arriveAirportDate = data.data[i].itineraries[j].arriveAirportDate?data.data[i].itineraries[j].arriveAirportDate:"";
								var status = data.data[i].status?data.data[i].status:"";
								if(status=="1"){
									status = "未支付";
								}
								if(status=="2"){
									status = "已支付";
									delconStr="";
								}
								if(status=="3"){
									status = "审核通过";
								}
								if(status=="4"){
									status = "审核不通过";
								}
								if(status=="0"){
									status = "已取消";
								}
								No++		
								str2+="<tr>"+
											"<td>"+No+"</td>"+
											"<td>"+data.data[i].itineraries[j].departureAirportCode+"-"+data.data[i].itineraries[j].arriveAirportCode+"</td>"+
											"<td>"+data.data[i].itineraries[j].flightNumber+"</td>"+
											"<td>"+commomFun.toEmptyString(data.data[i].itineraries[j].seatClass)+"</td>"+
											"<td>"+commomFun.toEmptyString(data.data[i].itineraries[j].aircraft)+"</td>"+
											"<td>"+data.data[i].itineraries[j].departureDate+"</td>"+
											"<td>"+data.data[i].itineraries[j].departureTime+"</td>"+
											"<td>"+arriveAirportDate+"</td>"+
											"<td>"+data.data[i].itineraries[j].arriveAirportTime+"</td>"+
											"<td>"+status+"</td>"+
									  "</tr>" 
								}
							
							
						   //总费用的计算	
						   var costTotal=0,costAdult=0,costChild=0,costInfant=0;						   
						   if(!data.data[i].adultPassengerNumber||data.data[i].adultPassengerNumber==null||data.data[i].adultPassengerNumber==undefined){
							   data.data[i].adultPassengerNumber=0;
						   }
						   if(!data.data[i].childPassengerNumber||data.data[i].childPassengerNumber==null||data.data[i].childPassengerNumber==undefined){
							   data.data[i].childPassengerNumber=0;
						   }
						   if(!data.data[i].infantPassengerNumber||data.data[i].infantPassengerNumber==null||data.data[i].infantPassengerNumber==undefined){
							   data.data[i].infantPassengerNumber=0;
						   }
						   costAdult = data.data[i].adultPassengerNumber*data.data[i].adultPrice;		   
						   costChild = data.data[i].childPassengerNumber*data.data[i].childPrice;
						   costInfant = data.data[i].infantPassengerNumber*data.data[i].infantPrice;
						   
						  
						   //票价与支付
						   var priceTFCAdult =0;//成人总费用(单人)
						   if((data.data[i].adultPrice!=undefined)&&(data.data[i].adultTFC!=undefined)){
							   priceTFCAdult=(data.data[i].adultPrice+data.data[i].adultTFC).toFixed(2);							   
						   }else{
							   priceTFCAdult =0;								   
						   }
						   var priceTFCChild =0; //儿童总费用（单人）
						   if((data.data[i].childPrice!=undefined)&&(data.data[i].childTFC!=undefined)){
							   priceTFCChild=(data.data[i].childPrice+data.data[i].childTFC).toFixed(2);
						   }else{
							   priceTFCChild =0;
						   }
						   var priceTFCInfant = 0;//婴儿总费用（单人）
						   if((data.data[i].infantPrice!=undefined)&&(data.data[i].infantTFC!=undefined)){
							   priceTFCInfant=(data.data[i].infantPrice+data.data[i].infantTFC).toFixed(2);
						   }else{
							   priceTFCInfant=0;
						   }
						   var typeCost1 = (priceTFCAdult*data.data[i].adultPassengerNumber).toFixed(2);//成人总费用
						   typeCost1==0.00?typeCost1=0:typeCost1;
						   var typeCost2 = (priceTFCChild*data.data[i].childPassengerNumber).toFixed(2);//儿童总费用
						   typeCost2==0.00?typeCost2=0:typeCost2;
						   var typeCost3 = (priceTFCInfant*data.data[i].infantPassengerNumber).toFixed(2); //婴儿总费用
						   typeCost3==0.00?typeCost3=0:typeCost3;
						   costTotal=(parseFloat(typeCost2)+parseFloat(typeCost3)+parseFloat(typeCost1)).toFixed(2)
						   
						  
						   var str3 = "";
						    
						   str3+="<tr>"+
						   			"<td>成人</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].adultPrice)+"</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].adultTFC)+"</td>"+
						   			"<td>"+priceTFCAdult+"</td>"+
						   			"<td>"+data.data[i].adultPassengerNumber+"</td>"+
						   			"<td>"+typeCost1+"</td>"+
						   			"<td rowspan=3>"+commomFun.toEmptyString(data.data[i].settlePrice)+"</td>"+
						   		 "</tr>"+
						   		 "<tr>"+
						   			"<td>儿童</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].childPrice)+"</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].childTFC)+"</td>"+
						   			"<td>"+priceTFCChild+"</td>"+
						   			"<td>"+data.data[i].childPassengerNumber+"</td>"+
						   			"<td>"+typeCost2+"</td>"+
						   		 "</tr>"+
						   		 "<tr>"+
						   			"<td>婴儿</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].infantPrice)+"</td>"+
						   			"<td>"+commomFun.toEmptyString(data.data[i].infantTFC)+"</td>"+
						   			"<td>"+priceTFCInfant+"</td>"+
						   			"<td>"+data.data[i].infantPassengerNumber+"</td>"+
						   			"<td>"+typeCost3+"</td>"+
						   		 "</tr>"
						   var str4 = "";
						   for(var j=0;j<data.data[i].passengers.length;j++){							  
							   var index = j+1;
							   str4+="<tr>"+
							  			"<td>"+index+"</td>"+
							  			"<td style=display:none; class=passengerId>"+data.data[i].passengers[j].id+"</td>"+
							   			"<td class='chineseName'>"+data.data[i].passengers[j].chineseSurname+data.data[i].passengers[j].chineseName+"</br>"+data.data[i].passengers[j].englishSurname+data.data[i].passengers[j].englishName+"</td>"+							   			
							   			"<td>"+commomFun.genderStr(data.data[i].passengers[j].gender)+"</td>"+
							   			"<td>"+commomFun.typeNumStr(data.data[i].passengers[j].type)+"</td>"+
							   			"<td>"+commomFun.certificateTypeStr(data.data[i].passengers[j].certificateType)+"</td>"+
							   			"<td class='certificateNumber'>"+data.data[i].passengers[j].certificateNumber+"</td>"+
							   			"<td>"+data.data[i].passengers[j].certificateExpireDate+"</td>"+
							   			"<td>"+data.data[i].passengers[j].birthDate+"</td>"+
							   			"<td>"+commomFun.toEmptyString(data.data[i].passengers[j].mobile)+"</td>"+
							   			"<td class='signTicketNumber'>"+commomFun.toEmptyString(data.data[i].passengers[j].ticketNumber)+"</td>"+
							   		 "</tr>"
						   }
						   
						   if((data.data[i].status=="1")&&($(".conadu").val()=="1")){
							   adultBtnStr+="<span class='adultBtn iconfont' connectId="+data.data[i].id+" title='审核'>&#xe626;</span>";
						   }
						   str+="<div class='connectMess someCommonEle'>" +
								"<p class='connectMessHead'>" +
									"<span class='route'>" +
										"<span class='font00aa98'>联程-" +
											"<span style='margin-right:50px;'>"+data.data[i].itineraries[0].departureAirportCode+"</span>" +
										"</span>总费用:" +
										"<span class='cost'>"+costTotal+commomFun.currencyMStr(exportsData.quoteCurrency)+"</span>" +
										"人数:成人<span>"+data.data[i].adultPassengerNumber+"</span>人，" +
										"儿童<span>"+data.data[i].childPassengerNumber+"</span>人，" +
										"婴儿<span>"+data.data[i].infantPassengerNumber+"</span>人" +
										"<span class='someDoRight'>" +
											"<span class='showHide iconfont' title='收起展开' onOff='hide'>&#xe807;</span>" +
											"<span style='display:none;'>"+indexNo+"</span>"+delconStr+adultBtnStr+
										"</span>" +
										"<span class='connectInfoId' style=display:none>"+data.data[i].id+"</span>" +
									"</span>" +
								"</p>" +
								"<div class='connectDetail'>" +
									"<table class='lianTable1'>" +
										"<tr>" +
											"<th>序号</th>" +
											"<th>行程</th>" +
											"<th>航班号</th>" +
											"<th>舱位</th>" +
											"<th>机型</th>" +
											"<th>出发日期</th>" +
											"<th>出发时间</th>" +
											"<th>到达日期</th>" +
											"<th>到达时间</th>" +
											"<th>是否已支付</th>" +
										"</tr>" + str2
										
							str+=	"</table>" +
									"<p class='passengerTicMess'>旅客与出票信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人数:成人<span>"+data.data[i].adultPassengerNumber+"</span>人，儿童<span>"+data.data[i].childPassengerNumber+"</span>人，婴儿<span>"+data.data[i].infantPassengerNumber+"</span>人<span index="+i+" class='conChanTicket'>更新票号</span></p>" +
									"<table class='connectTable2'>"+
										"<tr>"+
											"<th>序号</th>"+
											"<th>旅客姓名</th>"+
											"<th>性别</th>"+
											"<th>旅客类型</th>"+
											"<th>证件类别</th>"+
											"<th>证件号</th>"+
											"<th>证件有效期</th>"+
											"<th>出生日期</th>"+
											"<th>手机号</th>"+	
											"<th>票号</th>"+
										"</tr>" + str4
							var settleCurrencyStr = "";//实收货币类型
						    if(data.data[i].settleCurrency){
						    	settleCurrencyStr = '('+data.data[i].settleCurrency+')';
						    }
							str+=		"</table>"+																
									"<p class='priceAndPay'>票价与支付</p>" +
									"<table class='lianTable2'>" +
										"<tr>" +
											"<th>旅客类型</th>" +
											"<th>票价</th>" +
											"<th>税金</th>" +
											"<th>总费用(单人)</th>" +
											"<th>旅客人数 </th>" +
											"<th>总费用</th>" +
											"<th>实收金额"+settleCurrencyStr+"</th>" +
										"</tr>" + str3
							str+=	"</table>" +
								"</div>" +
							"</div>"
							
							
						}
						$(".connectList").append(str)
					}
				}
			})
//_________________________________________________________________________________第9个接口  升舱信息展示	
			$.ajax({
				type:"get",
				url:"../orderAddon/getExchList?orderId="+u[1]+"&temp="+Math.random(),
				dataType:"json",
				async:true,
				success:function(data){
					$(".seatUpContent").empty();
					var data = data.data;	
					for(var i=0;i<data.length;i++){		
							var str = "<div>";
							str+="<p class='seatUpHead'>" +
									"<span>"+
									"<b class='font00aa98' style='margin-left:20px;margin-right:25px;'>升舱</b>" +
									"<b>总费用：</b>" +
									"<span class='seatUpTotalPrice'>"+commomFun.toEmptyString((data[i].count*data[i].unitPrice).toFixed(2))+"</span>"+commomFun.currencyMStr(exportsData.quoteCurrency)+
						 			"<span class='seatUpDo'>" +
						 				"<span class='someDoRight'>" 
							if(data[i].status=="5"){								
								str+="<span class='seatUpAudit iconfont' exchId="+data[i].id+" title='审核'>&#xe626;</span>" 
							}
							if((data[i].status!="2")&&(data[i].status!="0")){
								str+="<span index="+data[i].id+" class='upCabinDel iconfont' title='删除'>&#xe606;</span>";
							}
									var settleCurrencyStr = "";//实收货币类型
								    if(data[i].settleCurrency){
								    	settleCurrencyStr = '('+data[i].settleCurrency+')';
								    }
								 	str+=	"<span style=display:none;>"+data[i].id+"</span>" +
								 		 	"<span title=展开 class='iconfont seatUpShow' onOff='hide'>&#xe807;</span>" +
								 		 "</span>" +
									"</span>" +
									"</span>"+
								 "</p>" +
								 "<div class='seatUpHide'>" +
								 "<div class='seatUpTableB'>" +
										"<table>" +
											"<thead>" +
												"<tr>" +
													"<th>行程</th>" +
													"<th>金额</th>" +
													"<th>实收金额"+settleCurrencyStr+"</th>" +
													"<th>人数</th>" +
													"<th>申请仓位</th>" +
													"<th>状态</th>" +
												"</tr>" +
											"</thead>" + 
											"<tbody>" +
												"<tr>" +
													"<td>"+commomFun.gradesTypeToStr(data[i].upgradesType)+"</td>" +
													"<td>"+commomFun.toEmptyString(data[i].unitPrice)+"</td>" +
													"<td>"+commomFun.toEmptyString(data[i].settlePrice)+"</td>" +
													"<td>"+data[i].count+"</td>" +
													"<td>"+commomFun.cabinStatusStr(data[i].cabin)+"</td>" +
													"<td>"+commomFun.otherOrderTypeToStr(data[i].status)+"</td>" +
												"</tr>" +																																			
											"<tbody>" +
										"</table>" +
								 "</div>" +
								 "<p class='seatUpHead'><span class='iconfont seatUpIcon'>&#xe609;</span><b style=margin-left:5px;margin-right:25px;>旅客与出票信息</b></p>" +				 					 
								 "<div class='seatUpTableB'>" +
										"<table>" +
											"<thead>" +
												"<tr>" +
													"<th>序号</th>" +
													"<th>旅客姓名</th>" +
													"<th>性别</th>" +
													"<th>旅客类型</th>" +
													"<th>证件类别</th>" +
													"<th>证件号</th>" +
													"<th>证件有效期</th>" +
													"<th>出生日期</th>" +
													"<th>手机号</th>" +
													"<th>票号</th>" +													
													"<th>操作</th>" +
												"</tr>" +
											"</thead>" + 
											"<tbody>" 
											
											for(var j=0;j<data[i].passengers.length;j++){
											str+="<tr>" +
													 "<td>"+(j+1)+"</td>" +
													 "<td><span class='passengerName'>"+data[i].passengers[j].chineseSurname+data[i].passengers[j].chineseName+"</span></br><span class='passengerNameE'>"+data[i].passengers[j].englishSurname+data[i].passengers[j].englishName+"</sapn></td>" +
													 "<td>"+commomFun.genderStr(data[i].passengers[j].gender)+"</td>" +
													 "<td>"+commomFun.typeNumStr(data[i].passengers[j].type)+"</td>" +
													 "<td>"+commomFun.certificateTypeStr(data[i].passengers[j].certificateType)+"</td>" +
													 "<td class='certiNum'>"+data[i].passengers[j].certificateNumber+"</td>" +
													 "<td>"+data[i].passengers[j].certificateExpireDate+"</td>" +
													 "<td>"+data[i].passengers[j].birthDate+"</td>" +
													 "<td>"+data[i].passengers[j].mobile+"</td>" +
													 "<td class='ticNum signTicketNumber'>"+commomFun.toEmptyString(data[i].passengers[j].ticketNumber)+"</td>" +										
													 "<td class='seatUpAddT'>添加票号</td>" +
													 "<td style=display:none; class='passId'>"+data[i].passengers[j].id+"</td>" +
													 "<td style=display:none; class='passengerKey'>"+data[i].passengers[j].passengerKey+"</td>" +
													 "<td style=display:none; class='passOrderId'>"+data[i].id+"</td>" +
												 "</tr>" 
											}
										str+="<tbody>" +
										"</table>" +
								 "</div>" +
								 "</div></div>"						 
							$(".seatUpContent").append(str);
							
						}
					}
		 
		 	})
		 
//————————————————————————————————————————————————————————————————————————————————追位信息展示
			$.ajax({
				type:"post",
				url:"../order/"+u[1]+"/seat/add/list?temp="+Math.random(),
				dataType:"json",
				async:true,
				contentType:'application/json;charset=utf-8',
				data:JSON.stringify({"status":null,"outside":"1"}),
				success:function(data){
					$(".zhuiWeiContent").empty();
					if(data.status==1001){
						var str = "";
						//删除和审核权限
						var seatAddAudit = $("#seatAddPermission").attr("seatAddAudit");
						var seatAddDel = $("#seatAddPermission").attr("seatAddDel");												
						for(var i=0;i<data.data.length;i++){
							var totalPrice1 = emptyTransZero((emptyTransZero(data.data[i].adultTax)+emptyTransZero(data.data[i].adultPrice)-0));
							var totalPrice2 = emptyTransZero((emptyTransZero(data.data[i].childTax)+emptyTransZero(data.data[i].childPrice)-0));
							var totalPrice3 = emptyTransZero((emptyTransZero(data.data[i].infantTax)+emptyTransZero(data.data[i].infantPrice)-0));
							var totalCount1 = (totalPrice1*emptyTransZero(data.data[i].adultCount)).toFixed(2);
							var totalCount2 = (totalPrice2*emptyTransZero(data.data[i].childCount)).toFixed(2);
							var totalCount3 = (totalPrice3*emptyTransZero(data.data[i].infantCount)).toFixed(2);
							var totalCount = ((totalCount1-0) + (totalCount2-0) + (totalCount3-0)).toFixed(2);
							var settleCurrencyStr = "";//实收货币类型
						    if(data.data[i].settleCurrency){
						    	settleCurrencyStr = '('+data.data[i].settleCurrency+')';
						    }
							str+='<div class="zhuiWei">'+
									'<div class="zhuiWeiTitle someCommonEle">'+
										'<b style="margin:0 25px 0 20px;" class="font00aa98">追加</b>'+
										'<span class="aaaaaa">总费用 : <b style="color:Red;"><span class="zhuiWeiCount">'+totalCount+'</span></b>'+commomFun.currencyMStr(exportsData.quoteCurrency)+' 总人数 : <b class="f00aa99 zhuiWeiPeople"> '+(data.data[i].adultCount+data.data[i].childCount+data.data[i].infantCount-0)+' </b></span>'+
										'<span class="zhuiWeiRight someDoRight">'
									if(seatAddAudit=="1"&&data.data[i].status=="0"){   //待审核的有审核和删除按钮
										str+='<span class="zhuiWeiAudit iconfont" index='+i+' osid='+data.data[i].id+' title="审核">&#xe626;</span>'
											 
									}
									if(seatAddDel=="1"&&data.data[i].status!="2"){
										str+='<span title="删除" class="iconfont zhuiWeiDel" index='+i+' osid='+data.data[i].id+'>&#xe606;</span>'
									}		
										str+='<span title="收起展开" onOff="hide" class="zhuiWeiShowHide iconfont" index='+i+'>&#xe807;</span>'+
										'</span>'+
									'</div>'+
									'<div class="zhuiWeiTable">'+
										'<table>'+
											'<tr style="background:#f0eeef">'+
												'<td>总人数</td>'+
												'<td>成人</td>'+
												'<td>儿童</td>'+
												'<td>婴儿</td>'+
												'<td>舱位</td>'+
												'<td>行程类型</td>'+
											'</tr>'+
											'<tr>'+
												'<td>'+(data.data[i].adultCount+data.data[i].childCount+data.data[i].infantCount-0)+'</td>'+
												'<td>'+data.data[i].adultCount+'</td>'+
												'<td>'+data.data[i].childCount+'</td>'+
												'<td>'+data.data[i].infantCount+'</td>'+
												'<td>'+zhuiWeiCabin+'</td>'+
												'<td>'+commomFun.seatAddRoundType(data.data[i].roundType)+'</td>'+
											'</tr>'+
										'</table>'+
										'<p class="title">'+
											'<span><i class="quare"></i> 票价与支付</span>'+
										'</p>'+
										'<table>'+
											'<tr style="background:#f0eeef">'+
												'<td>旅客类型</td>'+
												'<td>票价</td>'+
												'<td>税金</td>'+
												'<td>总费用(单人)</td>'+
												'<td>旅客人数</td>'+
												'<td>总费用</td>'+
												'<td>实收金额'+settleCurrencyStr+'</td>'+
											'</tr>'+
											'<tr>'+
												'<td>成人</td>'+												
												'<td>'+emptyTransZero(data.data[i].adultPrice)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].adultTax)+'</td>'+
												'<td>'+totalPrice1.toFixed(2)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].adultCount)+'</td>'+												
												'<td>'+totalCount1+'</td>'+
												'<td rowspan=3>'+commomFun.toEmptyString(data.data[i].settlePrice)+'</td>'+
											'</tr>'+
											'<tr>'+
												'<td>儿童</td>'+
												'<td>'+emptyTransZero(data.data[i].childPrice)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].childTax)+'</td>'+
												'<td>'+totalPrice2.toFixed(2)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].childCount)+'</td>'+
												'<td>'+totalCount2+'</td>'+
											'</tr>'+
											'<tr>'+
												'<td>婴儿</td>'+
												'<td>'+emptyTransZero(data.data[i].infantPrice)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].infantTax)+'</td>'+
												'<td>'+totalPrice3.toFixed(2)+'</td>'+
												'<td>'+emptyTransZero(data.data[i].infantCount)+'</td>'+
												'<td>'+totalCount3+'</td>'+
											'</tr>'+
										'</table>'+
									'</div>'+
								'</div>'
						}
						$(".zhuiWeiContent").append(str);						
					}
				},
				error:function(){
					
				}
			})
//________________________________________________________________________________修改旅客信息
			$.ajax({
				type:"post",
				url:"../passenger/m/list?temp="+Math.random(),
				dataType:"json",
				async:true,
				contentType:'application/json;charset=utf-8',
				data:JSON.stringify({"orderId":u[1]}),
				success:function(data){
					$(".changePassengerMessContent").empty();
					if(data.status==1001){
						var str = "";
						//审核和删除权限
						var changePassengerMessAudit = $("#changePassengerMessPermission").attr("changePassengerMessAudit");
						var changePassengerMessDel = $("#changePassengerMessPermission").attr("changePassengerMessDel");
						for(var i=0;i<data.data.length;i++){
							str += '<div class="passengerMessContent">'+
										'<div class="passengerMessPanle someCommonEle">'+
											'<b class="font00aa98 titMargin">更改旅客信息</b>'+
											'<span style="margin-left:20px;" class="fontababab">总费用 : <b class="fontfe3e3d">'+commomFun.toEmptyString(data.data[i].quoteCurrency)+'<span>'+commomFun.toEmptyString(data.data[i].quotePrice)+'</span></b></span>'+
											'<span style="margin-left:20px;" class="fontababab">实收费用 : <b class="fontfe3e3d">'+commomFun.toEmptyString(data.data[i].settleCurrency)+'<span>'+commomFun.toEmptyString(data.data[i].settlePrice)+'</span></b></span>'+
											'<span style="margin-left:20px;" class="fontababab">支付状态 : <b class="fontfe3e3d">'+commomFun.changePassengerMessStstus(data.data[i].status)+'</b></span>'+
											'<span class="panleHandle fontf9a000 someDoRight">'
											if(changePassengerMessAudit=="1"&&data.data[i].status=="1"){
												str += '<span class="changePassengerMessAudit iconfont" title="审核" index='+i+'>&#xe626;</span>';
											}
											if(changePassengerMessDel=="1"&&data.data[i].status!="4"){
												str+='<span class="iconfont changePassengerMessDel" title="删除" pmId='+data.data[i].id+' index='+i+'>&#xe606;</span>';
											}	
										   
												str+='<span class="changePassengerMessShow iconfont" onOff="hide" title="展开收起" passengerKey='+data.data[i].id+'>&#xe807;</span>'+
											'</span>'+
										'</div>'+
									'<div class="passengerMessMain">'+
										'<p><b>修改后</b></p>'+
										'<table class="changeBefore">'+
											'<tr>'+
												'<th>旅客姓名</th>'+
												'<th>出生日期</th>'+
												'<th>性别</th>'+
												'<th>国籍</th>'+
												'<th>证件类型</th>'+
												'<th>证件号</th>'+
												'<th>证件有效期</th>'+
												'<th>发证国</th>'+
												'<th>电话</th>'+
												'<th>酒店信息</th>'+
												'<th>邮箱</th>'+
											'</tr>'+
											'<tr>'+
												'<td>'+commomFun.toEmptyString(data.data[i].chineseSurname)+commomFun.toEmptyString(data.data[i].chineseName)+'<br/>'+commomFun.toEmptyString(data.data[i].englishSurname)+commomFun.toEmptyString(data.data[i].englishName)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].birthDate)+'</td>'+
												'<td>'+commomFun.genderStr(data.data[i].gender)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].country)+'</td>'+
												'<td>'+commomFun.certificateTypeStr(data.data[i].certificateType)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].certificateNumber)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].certificateExpireDate)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].issuingCountry)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].mobile)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].grogshop)+'</td>'+
												'<td>'+commomFun.toEmptyString(data.data[i].email)+'</td>'+
											'</tr>'+
										'</table>'+										
									'</div>'+
								'</div>'
						}
						$(".changePassengerMessContent").append(str);
					}
				}
			})
		}
		
//_________________________________________________________________________________更新票号
		
		$(".updateTickets").click(function(){			
			var ele = $(".clearPassenger");
			var type = "common";
			updateTic(ele,type);
		})

//_________________________________________________________________________________联运更新票号
		$(".connectList").delegate(".conChanTicket","click",function(){	
			var index = $(this).attr("index");
			var length = $(".connectTable2").eq(index).find("tr").length;
			if(length==1){
				layer.msg('暂无联运旅客信息', {icon: 2,time:1000});	
				return false;
			}else{
				var ele = $(".connectTable2").eq(index);
				var type = "connect";
				updateTic(ele,type)
			}
			   
		})
		//封装更新票号的方法
		function updateTic(ele,type){
			postUpdateTicketsJson = {};
			postUpdateTicketsJson.nameArr = [];
			postUpdateTicketsJson.passengerIdArr = [];
			postUpdateTicketsJson.certificateNumberArr = [];
			postUpdateTicketsJson.ticketsNumberArr = [];
			var length = ele.find(".chineseName").length;
			for(var i=0;i<length;i++){
				postUpdateTicketsJson.nameArr.push(ele.find(".chineseName").eq(i).text());
				postUpdateTicketsJson.passengerIdArr.push(ele.find(".passengerId").eq(i).text());
				postUpdateTicketsJson.certificateNumberArr.push(ele.find(".certificateNumber").eq(i).text());
				postUpdateTicketsJson.ticketsNumberArr.push(ele.find(".signTicketNumber").eq(i).text());
			}			
			      layer.open({
			        type: 2,
			        title: ['更新票号','background-color:#6d6e72; color:#fff;'],
			        shadeClose: true,
			        shade: [0.9,'#cfcfcf'],
			        area: ['600px', '340px'],  
			        content: ['../ak/updateTic.html?orderId='+u[1]+'&type='+type],// iframe的url，no代表不显示滚动条
			        end:function(){
			        	allAjax();
			        }			          
			      });			
		}
//_________________________________________________________________________________导出名单
		$(".importNames").click(function(){
			layer.load();
			var url = "../order/"+u[1]+"/downloadExcel?temp="+Math.random();
			$.ajax({
			    url: url,
			    type: 'get',
			    success: function(data) {
			    	try{
			    		var data = JSON.parse(data);
			    		layer.closeAll('loading');
			    		layer.alert(data.message);
			    	}catch(e){			    		
			    		window.location = url;
			    		layer.closeAll('loading');
			    	}	    		    	  		    		    		    		        
			    }
			});	
		})
//_________________________________________________________________________________showHide
		$(".connectList").delegate(".showHide","click",function(){
			var onOff = $(this).attr("onOff");
			var index = $(this).next().text();
			if(onOff=="hide"){
				$(".connectDetail").eq(index).show(500);
				$(this).attr("onOff","show").html("&#xe806;");
			}else if(onOff=="show"){
				$(".connectDetail").eq(index).hide(500);
				$(this).attr("onOff","hide").html("&#xe807;");
			}													
		})
//_____________________________________________________________________________追加展开收缩
		$(".zhuiWeiContent").delegate(".zhuiWeiShowHide","click",function(){
			var onOff = $(this).attr("onOff");
			var index = $(this).attr("index");
			if(onOff=="hide"){
				$(".zhuiWeiTable").eq(index).show(500);
				$(this).attr("onOff","show").html("&#xe806;");
			}else if(onOff=="show"){
				$(".zhuiWeiTable").eq(index).hide(500);
				$(this).attr("onOff","hide").html("&#xe807;");
			}			
		})
//__________________________________________________________________________________追加删除
		$(".zhuiWeiContent").delegate(".zhuiWeiDel","click",function(){			
			var osid = $(this).attr("osid");
			layer.confirm('确定取消追加？', {
				 btn: ['确定','取消'] //按钮
			}, function(){
				  layer.load();
				  $.ajax({
						type:"post",
						url:"../order/"+u[1]+"/outside/seat/"+osid+"/cancel?temp="+Math.random(),
						contentType:'application/json;charset=utf-8',
						dataType:"json",
						async:true,
						success:function(data){
							layer.closeAll('loading');
							if(data.status=="1001"){
								layer.msg('取消成功', {icon: 1,time:1000},function(){
									allAjax();
								});			
							}else{							
								layer.alert("取消失败——"+data.message);
							}
						}
					});
			});
		})
//__________________________________________________________________________________追加审核
		$(".zhuiWeiContent").delegate(".zhuiWeiAudit","click",function(){
			var index = $(this).attr("index");
			var osid = $(this).attr("osid");
			layer.open({
		        type: 2,
		        title: ['追加审核','background-color:#6d6e72; color:#fff;'],
		        shadeClose: true,
		        shade: 0.3,
		        area: ['100%', '100%'],  
		        content: ['../ak/zhuiWeiAudit.html?orderId='+u[1]+'&index='+index+'&osid='+osid+'&cabin='+zhuiWeiCabin],// iframe的url，no代表不显示滚动条
		        end:function(){
		        	allAjax()
		        }			          
		      });	
		})
/*———————————————————————————————————————酒店详情鼠标的悬浮与展开—————————————————————————————————————————————*/
			$('.hover_grogshop').delegate(".detail_grogshop","mouseover",function(){
				$(this).next("div").css("display","block");	
			});
			$('.hover_grogshop').delegate(".detail_grogshop","mouseout",function(){
				$(this).next("div").css("display","none");
			});
//______________________________________________附加项的显示与隐藏________________________
		$(".showFujia").click(function(){
			var onOff = $(this).attr("onOff");
			if(onOff=="hide"){
				$(".changeTicketsAndSeat").slideDown();
				$(this).attr("onOff","show").html("&#xe806;");
			}else if(onOff=="show"){
				$(".changeTicketsAndSeat").slideUp();
				$(this).attr("onOff","hide").html("&#xe807;");
			}		
		})

//______________________________________________调票的添加______________________________
		$(".addChangeTickets").click(function(){
			var baojia = $(".baojiaCurrency").text();
			var status = commomFun.orderStatusNum($("#status").text());
			layer.open({
		        type: 2,
		        title: ['调票','background-color:#6d6e72; color:#fff;'],
		        shadeClose: true,
		        shade: [0.9,'#cfcfcf'],
		        area: ['450px', '340px'],  
		        content: ['../ak/changeTickets.html?baojia='+baojia+'&status='+status],// iframe的url，no代表不显示滚动条
		        end:function(){
		        	allAjax()
		        }			          
		     });	
		})
//____________________________________________旅客与出票信息1的显示与隐藏_____________
		$(".show1").click(function(){
			var onOff = $(this).attr("onOff");
			if(onOff=="hide"){
				$(this).attr("onOff","show").html("&#xe806;");
				$(".passengersInformation").slideDown();
			}else if(onOff=="show"){
				$(this).attr("onOff","hide").html("&#xe807;");
				$(".passengersInformation").slideUp();
			}			
		})
//________________________________________________点击税金的添加___________________
		$(".addTaxes").click(function(){
			var baojia = $(".baojiaCurrency").text();
			var status = commomFun.orderStatusNum($("#status").text());
			layer.open({
		        type: 2,
		        title: ['税金','background-color:#6d6e72; color:#fff;'],
		        shadeClose: true,
		        shade: [0.9,'#cfcfcf'],
		        area: ['450px', '340px'],  
		        content: ['../ak/addTaxes.html?baojia='+baojia+'&status='+status],// iframe的url，no代表不显示滚动条
		        end:function(){
		        	allAjax()
		        }			          
		     });	
		})
//_______________________________________________________________调整票款的编辑
		$(".editTZPKRight").delegate(".editTZPK","click",function(){
			var baojia = $(".baojiaCurrency").text();
			var status = commomFun.orderStatusNum($("#status").text());
			layer.open({
		        type: 2,
		        title: ['调整票款编辑','background-color:#6d6e72; color:#fff;'],
		        shadeClose: true,
		        shade: [0.9,'#cfcfcf'],
		        area: ['450px', '340px'],  
		        content: ['../ak/editTZPK.html?baojia='+baojia+'&status='+status],// iframe的url，no代表不显示滚动条
		        end:function(){
		        	allAjax()
		        }			          
		     });	
		})
//_______________________________________________________________调整票款的收起展开
		$(".editTZPKRight").delegate(".tzpkShow","click",function(){
			var onOff = $(this).attr("onOff");
			if(onOff=="hide"){
				$(".tiaoPiaoTable").fadeIn();
				$(this).attr("onOff","show").html("&#xe806;");
				$(".tzpk").css("padding-bottom","20px");
			}else{
				$(".tiaoPiaoTable").fadeOut();
				$(this).attr("onOff","hide").html("&#xe807;");
				$(".tzpk").css("padding-bottom","0px");
			}
		})
//________________________________________________审核联运___________________
$(".connectList").delegate(".adultBtn","click",function(){
	var connectId = $(this).attr("connectId");
			layer.open({
		        type: 2,
		        title: ['联运审核','background-color:#6d6e72; color:#fff;'],
		        shadeClose: true,
		        shade: [0.9,'#cfcfcf'],
		        area: ['100%', '100%'],  
		        content: ['../ak/connectAdult.html?connectId='+connectId],// iframe的url，no代表不显示滚动条
		        end:function(){
		        	allAjax()
		        }			          
		     });	
		})

//_________________________________________________删除联运__________________________
		$(".connectList").delegate(".deleteCon","click",function(){
			var connectOrderIds = [];
			var connectOrderId=$(this).attr("connectId");
			connectOrderIds.push(connectOrderId);
			layer.confirm('确认删除此联运？', {
				title:['温馨提示','background-color:#6d6e72;color:#fff'],
				shade: [0.9,'#cfcfcf'],
			   	btn: ['确定','取消'] //按钮
			}, function(){
				$.ajax({
					type:"post",
					url:"../order/connect/cancel?temp="+Math.random(),
					contentType:'application/json;charset=utf-8',
					data:JSON.stringify(connectOrderIds),
					success:function(data){		
						data = JSON.parse(data)
						if(data.status=="1001"){
							layer.msg('删除成功', {icon: 1},function(){
								layer.closeAll('dialog');
								allAjax()
							});						
						}else{
							layer.confirm(data.message, {
								title:['温馨提示','background-color:#00aa98;color:#fff'],
							   	btn: ['确定'] //按钮
							}, function(){
								layer.closeAll('dialog');
							});
							
						}
						
					}			
				});	
			})
		})
		
//——————————————————————————————————————————————————————合同号的点击——————————————————————
		$(".contractId").click(function(){
			var documentId = $(this).text();			
				layer.open({
					type: 2,
					title: ['合同详情','background-color:#6d6e72; color:#fff;'],
					shadeClose: true,
					shade: [0.9,'#cfcfcf'],
					area: ['100%', '100%'],  
					content: ['../ak/documentQueryDetail.html?documentId='+documentId],// iframe的url，no代表不显示滚动条
					end:function(){
						getAjax();
					}
						
				});
		})
//_________________________________________________________按钮是否显示的判断__________________
		function buttonOnOff(status,type){
			if(status=="0"){
				$(".importNames").hide();	//导入名单
				$(".updateTickets").hide();	//大更新票号
			}
			if(status=="1"){
				$(".updateTickets").hide();
		 		$(".addConnecting").show();
		 		$(".addChangeTickets").hide();	
		 		$(".ticketUpdate").show();	
		 		$(".addChangeSeats").show();
		 		$(".addTaxes").show();
		 		$(".importNames").hide();	//导入名单
		 	}if(status=="6"){
		 		$(".updateTickets").hide();
		 		$(".addConnecting").show();
		 		$(".addChangeTickets").show();	
		 		$(".ticketUpdate").show();	
		 		$(".addChangeSeats").show();
		 		$(".addTaxes").show();
		 		$(".importNames").hide();	//导入名单
		 	}if(status=="2"){
		 		$(".updateTickets").show();	
		 		$(".ticketUpdate").show();	
		 		$(".addChangeSeats").show();	
		 		$(".addConnecting").show();	
		 		$(".addChangeTickets").hide();	
		 		$(".addTaxes").show();
		 		$(".importNames").hide();	//导入名单
		 	}if(status=="3"){
		 		$(".updateTickets").show();	    //大更新票号
		 		$(".ticketUpdate").show();	    //升舱的更新票号
		 		$(".addChangeSeats").show();	//升舱
		 		$(".addConnecting").hide();	    //增加联程
		 		$(".addChangeTickets").hide();	//调票	
		 		$(".addTaxes").show();
		 		$(".importNames").show();	//导入名单
		 	}if(status=="4"){
		 		$(".updateTickets").hide();	
		 		$(".ticketUpdate").hide();	
		 		$(".addChangeSeats").hide();	
		 		$(".addConnecting").hide();	
		 		$(".addChangeTickets").hide();
		 		$(".addTaxes").hide();
		 		$(".onOff").hide();
		 		$(".importNames").hide();	//导入名单
		 		$(".editTZPK").hide();//调整票款的添加按钮
		 	}if(status=="5"){
		 		$(".updateTickets").hide();
		 		$(".addConnecting").show();
		 		$(".addChangeTickets").hide();	
		 		$(".ticketUpdate").show();	
		 		$(".addChangeSeats").show();
		 		$(".addTaxes").show();
		 		$(".importNames").hide();	//导入名单
		 	}					
			if(type=="3"){				
				$(".changeTicketsP").hide();
				$(".changeTickets").hide();
				$(".contractIdSpan").hide();//散客无合同
				$(".passengerTotalSpan").hide();//散客无合同座位数
				$(".onOff").hide();//散客无关闭按钮
				$(".sanke_mess").hide();//产品散客订单不展示出票率、票损率、票损、免票方案；
				$(".sanke_mess_renshu").show();
			}
			//散客订单待审核、待支付状态支持取消
			if(!(type=="3"&&(status=="1"||status=="6"))){
				$(".cancel_SANKE").hide();
			}
			//散客订单待审核支持审核
			if(!(type=="3"&&status=="6")){
				$(".audit_SANKE").hide();
			}
			if(type=="3"&&(status=="2"||status=="3")){
				$(".onOff").show();
			}
		}
//——————————————————————————————————————————————————————————————————————————————————升舱的审核
		$(".seatUpContent").delegate(".seatUpAudit","click",function(){
			 var exchId = $(this).attr("exchId");
			 var baojia = $(".baojiaCurrency").text();
			 layer.open({
			        type: 2,
			        title: ['升舱审核','background-color:#6d6e72; color:#fff;'],
			        shadeClose: true,
			        shade: [0.9,'#cfcfcf'],
			        area: ['430px', '250px'],  
			        content: ['../ak/seatUpAudit.html?exchId='+exchId+'&baojia='+baojia],// iframe的url，no代表不显示滚动条
			        end:function(){
			        	allAjax();
			        }			          
			  });		
		})

//__________________________________________________________________________________升舱的添加票号
		$(".seatUpContent").delegate(".seatUpAddT","click",function(){
			  var name = $(this).parent().find("span[class=passengerName]").text()||$(this).parent().find("span[class=passengerNameE]").text();			  
			  var certificateNumber = $(this).parent().find("td[class=certiNum]").text();
			  var number = $(this).parent().find("td[class=ticNum]").text();
			  var id = $(this).parent().find("td[class=passId]").text();
			  var orderId = $(this).parent().find("td[class=passOrderId]").text();
			  var passengerKey = $(this).parent().find("td[class=passengerKey]").text();
			  layer.open({
			        type: 2,
			        title: ['添加票号','background-color:#6d6e72; color:#fff;'],
			        shadeClose: true,
			        shade: [0.9,'#cfcfcf'],
			        area: ['430px', '250px'],  
			        content: ['../ak/addTicNum.html?name='+name+'&passengerKey='+passengerKey+'&orderId='+orderId+'&certificateNumber='+certificateNumber+'&number='+number+'&id='+id],// iframe的url，no代表不显示滚动条
			        end:function(){
			        	allAjax();
			        }			          
			  });		
		})
//_______________________________________________________________________________升舱的删除
		$(".seatUpContent").delegate(".upCabinDel","click",function(){
			var index = $(this).attr("index");
			layer.confirm('确定取消升舱？', {
				 btn: ['确定','取消'] //按钮
			}, function(){
				  layer.load();
				  $.ajax({
						type:"post",						
						url:"../orderAddon/"+u[1]+"/exch/"+index+"/delete?temp="+Math.random(),
						contentType:'application/json;charset=utf-8',
						dataType:"json",
						async:true,
						success:function(data){
							layer.closeAll('loading');
							if(data.status=="1001"){
								layer.msg('取消成功', {icon: 1,time:1000},function(){
									allAjax();
								});			
							}else{							
								layer.alert("取消失败——"+data.message);
							}
						}
					});
			});
		})
	
		
//_____________________________________________________________________升舱的显示与隐藏
		$(".seatUpContent").delegate(".seatUpShow","click",function(){
			var onOff = $(this).attr("onOff");
			if(onOff=="hide"){
				$(this).parent().parent().parent().parent().next().show(500);
				$(this).attr("onOff","show").html("&#xe806;");
			}else if(onOff=="show"){
				$(this).parent().parent().parent().parent().next().hide(500);
				$(this).attr("onOff","hide").html("&#xe807;");
			}				
		})
//_________________________________________________________________________________________修改旅客信息的显示隐藏
		$(".changePassengerMessContent").delegate(".changePassengerMessShow","click",function(){
			if($(this).attr("onOff")=="hide"){
				$(this).parent().parent().next().show(500);
				$(this).attr("onOff","show");
				$(this).html("&#xe806;");
				var $target = $(this).parent().parent().next();
				if($target.find("table").length==1){
					var passengerKey = $(this).attr("passengerKey");
					
					layer.load();
					$.ajax({
						type:"get",						
						url:"../passenger/"+passengerKey+"?temp="+Math.random(),						
						dataType:"json",
						async:true,
						success:function(data){
							layer.closeAll("loading");
							if(data.status==1001){
								var str = "";
								str+=   '<p><b>修改前</b></p>'+
										'<table class="changeAfter">'+
										'<tr>'+
											'<th>旅客姓名</th>'+
											'<th>出生日期</th>'+
											'<th>性别</th>'+
											'<th>国籍</th>'+
											'<th>证件类型</th>'+
											'<th>证件号</th>'+
											'<th>证件有效期</th>'+
											'<th>发证国</th>'+
											'<th>电话</th>'+
											'<th>酒店信息</th>'+
											'<th>邮箱</th>'+
										'</tr>'+
										'<tr>'+
											'<td>'+commomFun.toEmptyString(data.data.chineseSurname)+commomFun.toEmptyString(data.data.chineseName)+'<br/>'+commomFun.toEmptyString(data.data.englishSurname)+commomFun.toEmptyString(data.data.englishName)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.birthDate)+'</td>'+
											'<td>'+commomFun.genderStr(data.data.gender)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.country)+'</td>'+
											'<td>'+commomFun.certificateTypeStr(data.data.certificateType)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.certificateNumber)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.certificateExpireDate)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.issuingCountry)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.mobile)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.grogshop)+'</td>'+
											'<td>'+commomFun.toEmptyString(data.data.email)+'</td>'+
										'</tr>'+
									'</table>'
								$target.prepend(str);							
							}else{
								layer.alert("修改前信息获取失败"+data.message,{icon:2})
							}
						}
					});
				}
			}else{
				$(this).parent().parent().next().hide(500);
				$(this).attr("onOff","hide");
				$(this).html("&#xe807;");
			}			
		})		
	//_________________________________________________________________________________________修改旅客信息的删除
		$(".changePassengerMessContent").delegate(".changePassengerMessDel","click",function(){
			var index = $(this).attr("index");
			var pmId = $(this).attr("pmId");
			layer.confirm('确定取消修改？', {
				 btn: ['确定','取消'] //按钮
			}, function(){
				  $.ajax({
						type:"post",						
						url:"../passenger/m/cancel?temp="+Math.random(),
						contentType:'application/json;charset=utf-8',
						dataType:"json",
						data:JSON.stringify({"pmId":pmId}),
						async:true,
						success:function(data){
							if(data.status=="1001"){
								layer.msg('取消成功', {icon: 1,time:1000},function(){
									allAjax();
								});			
							}else{							
								layer.alert("取消失败——"+data.message);
							}
						}
					});
			});
		})
	//_________________________________________________________________________________________修改旅客信息的审核	
		$(".changePassengerMessContent").delegate(".changePassengerMessAudit","click",function(){
			 var orderId = u[1];
			 var baojia = $(".baojiaCurrency").text();
			 var index = $(this).attr("index");
			 layer.open({
			        type: 2,
			        title: ['更改旅客信息审核','background-color:#6d6e72; color:#fff;'],
			        shadeClose: true,
			        shade: [0.9,'#cfcfcf'],
			        area: ['1070px', '90%'],  
			        content: ['../ak/changePassengerMessAudit.html?orderId='+orderId+'&baojia='+baojia+"&index="+index],// iframe的url，no代表不显示滚动条
			        end:function(){
			        	allAjax();
			        }			          
			  });		
		})
	//_________________________________________________________________________________________散客订单的取消
		$(".cancel_SANKE").click(function(){
			var id = $("#order_id").text();
		    layer.confirm('确认取消该订单？', {
		        title: ['温馨提示','background-color:#6d6e72; color:#fff;font-size:14px;'],
		        shade: [0.9,'#cfcfcf'],
		        btn: ['确定','取消'] //按钮
		    }, function(){
		        $.ajax({
		            type:"post",
		            url:"../order/"+id+"?trigger=pss",
		            async:false,
		            dataType:"json",
		            success:function(data){
		                if(data.status=="1001"){
		                    layer.msg('已取消', {icon: 1},function(){
		                    	allAjax();
		                    });
		                }else{
		                    layer.msg('订单取消失败—'+data.message, {icon: 2});
		                }
		            }
		        });

		    });
		})
		
	//_________________________________________________________________________________________散客订单的审核	
		
		$(".audit_SANKE").click(function(){
			 var orderId = $("#order_id").text();
			 layer.open({
			        type: 2,
			        title: ['审核','background-color:#6d6e72; color:#fff;'],
			        shadeClose: true,
			        shade: [0.9,'#cfcfcf'],
			        area: ['430px', '60%'],  
			        content: ['../ak/audit_SANKE.html?orderId='+orderId],// iframe的url，no代表不显示滚动条
			        end:function(){
			        	allAjax();
			        }			          
			  });		
		})
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		//封装函数将如果是空""转化为数字0
		function emptyTransZero(n){
			if(n==""||n==undefined){
				return Number("0");
			}else{
				return Number(n);
			}
			
		}